﻿using Newtonsoft.Json;

namespace QQMapSDK.Models
{
    public class AddressReference
    {
        #region Model
        [JsonProperty("famous_area")]
        public ReferenceItem? FamousArea { get; set; }

        [JsonProperty("business_area")]
        public ReferenceItem? BusinessArea { get; set; }

        [JsonProperty("town")]
        public ReferenceItem? Town { get; set; }

        [JsonProperty("landmark_l1")]
        public ReferenceItem? LandmarkL1 { get; set; }

        [JsonProperty("landmark_l2")]
        public ReferenceItem? LandmarkL2 { get; set; }

        [JsonProperty("street")]
        public ReferenceItem? Street { get; set; }

        [JsonProperty("street_number")]
        public ReferenceItem? StreetNumber { get; set; }

        [JsonProperty("crossroad")]
        public ReferenceItem? Crossroad { get; set; }
        #endregion
    }

    public class ReferenceItem
    {
        #region Model
        [JsonProperty("id")]
        public string? Id { get; set; }

        [JsonProperty("title")]
        public string? Title { get; set; }

        [JsonProperty("location")]
        public Location Location { get; set; }

        [JsonProperty("_distance")]
        public double Distance { get; set; }

        [JsonProperty("_dir_desc")]
        public string? DirDesc { get; set; }
        #endregion
    }

    public class FormattedAddresses
    {
        #region Model
        [JsonProperty("recommend")]
        public string? Recommend { get; set; }

        [JsonProperty("rough")]
        public string? Rough { get; set; }

        [JsonProperty("standard_address")]
        public string? StandardAddress { get; set; }
        #endregion
    }
}
